Skip to content

Comments

Fix toFixed(0) rounding bug#5278

Open
hermet wants to merge 1 commit intojerryscript-project:masterfrom
hermet:master
Open

Fix toFixed(0) rounding bug#5278
hermet wants to merge 1 commit intojerryscript-project:masterfrom
hermet:master

Conversation

@hermet
Copy link

@hermet hermet commented Feb 19, 2026

Rounding at zero decimal places was incorrect due to an improper character comparison. The condition now correctly compares ASCII digit characters.

PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING

Before submitting a PR, please, make sure that:

  • Changes are in a separate branch, not in master.
  • The branch contains only one commit on top of master (if not, squash them into
    one commit).
  • The commit has a descriptive commit message with a concise title (first line).
  • The commit message contains fixes #XXXX or closes #XXXX to auto-close the
    issue(s) that the PR fixes (if any).
  • Tests for the changes have been added (for bug fixes / features).
  • Documentation has been added / updated (if applicable).
  • All new and existing tests passed locally (if not, fix them first and amend
    the commit).

IMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing
guidelines.

PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING

Rounding at zero decimal places was incorrect due to an improper
character comparison. The condition now correctly compares ASCII
digit characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant